<!DOCTYPE html SYSTEM "about:legacy-compat">
<html lang="en"><head><META http-equiv="Content-Type" content="text/html; charset=iso-8859-15"><title>Apache JMeter
          -
          User's Manual: Getting Started</title><meta name="viewport" content="width=device-width, initial-scale=1"><link href="http://fonts.googleapis.com/css?family=Merriweather:400normal" rel="stylesheet" type="text/css"><link rel="stylesheet" type="text/css" href="../css/new-style.css"></head><body role="document"><a href="#content" class="hidden">Main content</a><div class="header"><!--
            APACHE LOGO
          --><div><a href="http://www.apache.org"><img title="Apache Software Foundation" width="290" height="75" src="../images/asf-logo.png" alt="Logo ASF"></a></div><!--
              PROJECT LOGO
            --><div><a href="http://jmeter.apache.org/"><img src="../images/logo.jpg" alt="Apache JMeter"></a></div><div class="twitter"><div><a href="https://twitter.com/share" class="twitter-share-button" data-text="Powerful Load Testing with Apache #JMeter" data-via="ApacheJMeter" data-lang="en-gb" data-size="large">Tweet</a><script>
            (function(d,s,id){
              var js,
                  fjs=d.getElementsByTagName(s)[0],
                  p=/^http:/.test(d.location)?'http':'https';
              if (!d.getElementById(id)) {
                  js=d.createElement(s);
                  js.id=id;
                  js.src=p+'://platform.twitter.com/widgets.js';
                  fjs.parentNode.insertBefore(js,fjs);
              }
            })(document, 'script', 'twitter-wjs');
              </script></div><div><a href="https://twitter.com/ApacheJMeter" class="twitter-follow-button" data-show-count="false" data-lang="en-gb" data-size="large">Follow</a><script>(function(d,s,id){
                var js,
                    fjs=d.getElementsByTagName(s)[0],
                    p=/^http:/.test(d.location)?'http':'https';
                if (!d.getElementById(id)) {
                    js=d.createElement(s);
                    js.id=id;
                    js.src=p+'://platform.twitter.com/widgets.js';
                    fjs.parentNode.insertBefore(js,fjs);
                }
            })(document, 'script', 'twitter-wjs');
              </script></div></div><div class="banner"><iframe src="http://www.apache.org/ads/bannerbar.html" style="border-width:0;" frameborder="0" scrolling="no"></iframe><div class="clear"></div></div></div><div class="nav"><ul class="menu"><li><div class="menu-title">About</div><ul><li><a href="../index.html">Overview</a></li><li><a href="http://twitter.com/ApacheJMeter">JMeter on Twitter<img src="../images/twitter.png" alt="Icon for JMeter on Twitter"></a></li><li><a href="../issues.html">Issue Tracking</a></li><li><a href="http://projects.apache.org/feeds/rss/jmeter.xml">Subscribe to What's New</a></li><li><a href="http://www.apache.org/licenses/">License</a></li></ul></li></ul><ul class="menu"><li><div class="menu-title">Download</div><ul><li><a href="../download_jmeter.cgi">Download Releases</a></li><li><a href="../nightly.html">Developer (Nightly) Builds</a></li></ul></li></ul><ul class="menu"><li><div class="menu-title">Documentation</div><ul><li><a href="../changes.html">Changes per version</a></li><li><a href="../usermanual/get-started.html">Get Started</a></li><li><a href="../usermanual/index.html">User Manual</a></li><li><a href="../usermanual/best-practices.html">Best Practices</a></li><li><a href="../usermanual/component_reference.html">Component Reference</a></li><li><a href="../usermanual/functions.html">Functions Reference</a></li><li><a href="../api/index.html">Javadocs</a></li><li><a href="../building.html">Building JMeter and Add-Ons</a></li><li><a href="http://wiki.apache.org/jmeter">JMeter Wiki</a></li><li><a href="http://wiki.apache.org/jmeter/JMeterFAQ">FAQ (Wiki)</a></li></ul></li></ul><ul class="menu"><li><div class="menu-title">Tutorials (PDF format)</div><ul><li><a href="../usermanual/jmeter_distributed_testing_step_by_step.pdf">Distributed Testing</a></li><li><a href="../usermanual/jmeter_proxy_step_by_step.pdf">Recording Tests</a></li><li><a href="../usermanual/junitsampler_tutorial.pdf">JUnit Sampler</a></li><li><a href="../usermanual/jmeter_accesslog_sampler_step_by_step.pdf">Access Log Sampler</a></li><li><a href="../extending/jmeter_tutorial.pdf">Extending JMeter</a></li></ul></li></ul><ul class="menu"><li><div class="menu-title">Community</div><ul><li><a href="http://wiki.apache.org/jmeter/JMeterCommitters">Contributors</a></li><li><a href="../mail.html">Mailing Lists</a></li><li><a href="../svnindex.html">SVN Repositories</a></li></ul></li></ul><ul class="menu"><li><div class="menu-title">Foundation</div><ul><li><a href="http://www.apache.org/">ASF</a></li><li><a href="http://www.apache.org/foundation/getinvolved.html">Get Involved in the ASF</a></li><li><a href="http://www.apache.org/foundation/sponsorship.html">Sponsorship</a></li><li><a href="http://www.apache.org/foundation/thanks.html">Thanks</a></li></ul></li></ul></div><div class="main" id="content"><ul class="pagelinks"><li><a href="intro.html">&lt; Prev</a></li><li><a href="../index.html">Index</a></li><li><a href="build-test-plan.html">Next &gt;</a></li></ul><div class="section"><h1 id="get_started">2. Getting Started<a class="sectionlink" href="#get_started" title="Link to here">&para;</a></h1>
<p>The easiest way to begin using JMeter is to first
<a href="http://jmeter.apache.org/download_jmeter.cgi">download the latest production release</a> and install it.
The release contains all of the files you need to build and run most types of tests,
e.g. Web (HTTP/HTTPS), FTP, JDBC, LDAP, Java, JUnit and more.</p>
<p>If you want to perform JDBC testing,
then you will, of course, need the appropriate JDBC driver from your vendor.  JMeter does not come with
any JDBC drivers.</p>
<p>
JMeter includes the JMS API jar, but does not include a JMS client implementation.
If you want to run JMS tests, you will need to download the appropriate jars from the JMS provider.
</p>
<div class="clear"></div><div class="note">
See the <a href="#classpath">JMeter Classpath</a> section for details on installing additional jars.
</div><div class="clear"></div>
<p>Next, start JMeter and go through the <a href="build-test-plan.html">Building a Test Plan</a> section
of the User Guide to familiarize yourself with JMeter basics (for example, adding and removing elements).</p>
<p>Finally, go through the appropriate section on how to build a specific type of Test Plan.
For example, if you are interested in testing a Web application, then see the section
<a href="build-web-test-plan.html">Building a Web Test Plan</a>.
The other specific Test Plan sections are:
<ul>
<li><a href="build-adv-web-test-plan.html">Advanced Web Test Plan</a></li>
<li><a href="build-db-test-plan.html">JDBC</a></li>
<li><a href="build-ftp-test-plan.html">FTP</a></li>
<li><a href="build-jms-point-to-point-test-plan.html">JMS Point-to-Point</a></li>
<li><a href="build-jms-topic-test-plan.html">JMS Topic</a></li>
<li><a href="build-ldap-test-plan.html">LDAP</a></li>
<li><a href="build-ldapext-test-plan.html">LDAP Extended</a></li>
<li><a href="build-ws-test-plan.html">WebServices (SOAP)</a></li>
</ul>
</p>
<p>Once you are comfortable with building and running JMeter Test Plans, you can look into the
various configuration elements (timers, listeners, assertions, and others) which give you more control
over your Test Plans.</p>

</div><div class="section"><h1 id="requirements">2.1 Requirements<a class="sectionlink" href="#requirements" title="Link to here">&para;</a></h1>
<p>JMeter requires that your computing environment meets some minimum requirements.</p>

<div class="subsection"><h2>2.1.1 Java Version<a class="sectionlink" href="#java_versions" title="Link to here">&para;</a></h2>
<div class="clear"></div><div class="note">JMeter requires a fully compliant JVM 6 or higher.  
</div><div class="clear"></div>
<p>Because JMeter uses only standard Java APIs, please do not file bug reports if your JRE fails to run
JMeter because of JRE implementation issues.</p>
</div>

<div class="subsection"><h2>2.1.2 Operating Systems<a class="sectionlink" href="#os" title="Link to here">&para;</a></h2>
<p>JMeter is a 100% Java application and should run correctly on any system
that has a compliant Java implementation.</p>
<p>Operating systems tested with JMeter can be viewed on  
<a href="http://wiki.apache.org/jmeter/JMeterAndOperatingSystemsTested">this page</a>
on JMeter wiki.</p>
<p>Even if your OS is not listed on the wiki page, JMeter should run on it provided that the JVM is compliant.</p>
</div>
</div><div class="section"><h1 id="optional">2.2 Optional<a class="sectionlink" href="#optional" title="Link to here">&para;</a></h1>
<p>If you plan on doing JMeter development, then you will need one or more optional packages listed below.</p>


<div class="subsection"><h2>2.2.1 Java Compiler<a class="sectionlink" href="#opt_compiler" title="Link to here">&para;</a></h2>
<p>If you want to build the JMeter source or develop JMeter plugins, then you will need a fully compliant JDK 6 or higher.</p>
</div>

<div class="subsection"><h2>2.2.2 SAX XML Parser<a class="sectionlink" href="#opt_sax" title="Link to here">&para;</a></h2>
<p>JMeter comes with Apache's <a href="http://xml.apache.org/">Xerces XML parser</a>. You have the option of telling JMeter
to use a different XML parser. To do so, include the classes for the third-party parser in JMeter's <a href="#classpath">classpath</a>,
and update the <a href="#configuring_jmeter">jmeter.properties</a> file with the full classname of the parser
implementation.</p>
</div>

<div class="subsection"><h2>2.2.3 Email Support<a class="sectionlink" href="#opt_email" title="Link to here">&para;</a></h2>
<p>JMeter has extensive Email capabilities. 
It can send email based on test results, and has a POP3(S)/IMAP(S) sampler.
It also has an SMTP(S) sampler.
</p>
</div>

<div class="subsection"><h2>2.2.4 SSL Encryption<a class="sectionlink" href="#opt_ssl" title="Link to here">&para;</a></h2>
<p>To test a web server using SSL encryption (HTTPS), JMeter requires that an
implementation of SSL be provided, as is the case with Sun Java 1.4 and above.
If your version of Java does not include SSL support, then it is possible to add an external implementation.
Include the necessary encryption packages in JMeter's <a href="#classpath">classpath</a>.  
Also, update <a href="#configuring_jmeter">system.properties</a> to register the SSL Provider.</p>
<p>
JMeter HTTP defaults to protocol level TLS. This can be changed by editting the JMeter property 
<i>https.default.protocol</i> in jmeter.properties or user.properties.
</p>
<p><b>The JMeter HTTP samplers are configured to accept all certificates,
whether trusted or not, regardless of validity periods, etc.</b>
This is to allow the maximum flexibility in testing servers.</p>
<p>If the server requires a client certificate, this can be provided.</p>
<p>There is also the <a href="../usermanual/component_reference.html#SSL_Manager">SSL Manager</a>, for greater control of certificates.</p>
<div class="clear"></div><div class="note">The JMeter proxy server (see below) supports recording HTTPS (SSL)</div><div class="clear"></div>
<p>
The SMTP sampler can optionally use a local trust store or trust all certificates.
</p>
</div>

<div class="subsection"><h2>2.2.5 JDBC Driver<a class="sectionlink" href="#opt_jdbc" title="Link to here">&para;</a></h2>
<p>You will need to add your database vendor's JDBC driver to the <a href="#classpath">classpath</a> if you want to do JDBC testing.
Make sure the file is a jar file, not a zip.
</p>
</div>

<div class="subsection"><h2>2.2.6 JMS client<a class="sectionlink" href="#opt_jms" title="Link to here">&para;</a></h2>
<p>
JMeter now includes the JMS API from Apache Geronimo, so you just need to add the appropriate JMS Client implementation
jar(s) from the JMS provider. Please refer to their documentation for details. 
There may also be some information on the <a href="http://wiki.apache.org/jmeter/">JMeter Wiki</a>.
</p>
</div>

<div class="subsection"><h2>2.2.7 Libraries for ActiveMQ JMS<a class="sectionlink" href="#libraries_activemq" title="Link to here">&para;</a></h2>
<p>
You will need to add the jar activemq-all-X.X.X.jar to your classpath, e.g. by storing it in the lib/ directory.
</p>
<p>
The other required jars (such as commons-logging) are already included with JMeter. 
</p>
<p>
See <a href="http://activemq.apache.org/initial-configuration.html">ActiveMQ initial configuration page</a>
for details.
</p>
</div>

<div class="clear"></div><div class="note">
See the <a href="#classpath">JMeter Classpath</a> section for more details on installing additional jars.
</div><div class="clear"></div>
</div><div class="section"><h1 id="install">2.3 Installation<a class="sectionlink" href="#install" title="Link to here">&para;</a></h1>

<p>We recommend that most users run the <a href="http://jmeter.apache.org/download_jmeter.cgi">latest release</a>.</p>
<p>To install a release build, simply unzip the zip/tar file into the directory
where you want JMeter to be installed.  Provided that you have a JRE/JDK correctly installed
and the JAVA_HOME environment variable set, there is nothing more for you to do.</p>
<p>
Note: there can be problems (especially with client-server mode) if the directory path contains any spaces.
</p>
<p>
The installation directory structure should look something like this (where X.Y is version number):
<pre>
apache-jmeter-X.Y
apache-jmeter-X.Y/bin
apache-jmeter-X.Y/docs
apache-jmeter-X.Y/extras
apache-jmeter-X.Y/lib/
apache-jmeter-X.Y/lib/ext
apache-jmeter-X.Y/lib/junit
apache-jmeter-X.Y/licenses
apache-jmeter-X.Y/printable_docs
</pre>
You can rename the parent directory (i.e. apache-jmeter-X.Y) if you want, but do not change any of the sub-directory names.
</p>
</div><div class="section"><h1 id="running">2.4 Running JMeter<a class="sectionlink" href="#running" title="Link to here">&para;</a></h1>
<br>
<p>To run JMeter, run the jmeter.bat (for Windows) or jmeter (for Unix) file.
These files are found in the bin directory.
After a short time, the JMeter GUI should appear. 
</p>

<p>
There are some additional scripts in the bin directory that you may find useful.
Windows script files (the .CMD files require Win2K or later):
<ul>
<li>jmeter.bat - run JMeter (in GUI mode by default)</li>
<li>jmeterw.cmd - run JMeter without the windows shell console (in GUI mode by default)</li>
<li>jmeter-n.cmd - drop a JMX file on this to run a non-GUI test</li>
<li>jmeter-n-r.cmd - drop a JMX file on this to run a non-GUI test remotely</li>
<li>jmeter-t.cmd - drop a JMX file on this to load it in GUI mode</li>
<li>jmeter-server.bat - start JMeter in server mode</li>
<li>mirror-server.cmd - runs the JMeter Mirror Server in non-GUI mode</li>
<li>shutdown.cmd - Run the Shutdown client to stop a non-GUI instance gracefully</li>
<li>stoptest.cmd - Run the Shutdown client to stop a non-GUI instance abruptly</li>
</ul>
Note: the special name LAST can be used with jmeter-n.cmd, jmeter-t.cmd and jmeter-n-r.cmd
and means the last test plan that was run interactively.
</p>

<p>
The environment variable JVM_ARGS can be used to override JVM settings in the jmeter.bat script.
For example:
<pre>
set JVM_ARGS="-Xms1024m -Xmx1024m -Dpropname=propvalue"
jmeter -t test.jmx ...
</pre>
</p>

<p>
Un*x script files; should work on most Linux/Unix systems:
<ul>
<li>jmeter - run JMeter (in GUI mode by default). Defines some JVM settings which may not work for all JVMs.</li>
<li>jmeter-server - start JMeter in server mode (calls jmeter script with appropriate parameters)</li>
<li>jmeter.sh - very basic JMeter script (You may need to adapt JVM options like memory settings).</li>
<li>mirror-server.sh - runs the JMeter Mirror Server in non-GUI mode</li>
<li>shutdown.sh - Run the Shutdown client to stop a non-GUI instance gracefully</li>
<li>stoptest.sh - Run the Shutdown client to stop a non-GUI instance abruptly</li>
</ul>
</p>
<p>
It may be necessary to edit the jmeter shell script if some of the JVM options are not supported
by the JVM you are using.
The JVM_ARGS environment variable can be used to override or set additional JVM options, for example:
<pre>
JVM_ARGS="-Xms1024m -Xmx1024m" jmeter -t test.jmx [etc.]
</pre>
will override the HEAP settings in the script.
</p>
<div class="subsection"><h2>2.4.1 JMeter's Classpath<a class="sectionlink" href="#classpath" title="Link to here">&para;</a></h2>
<p>JMeter automatically finds classes from jars in the following directories:</p>
<ul>
<li>JMETER_HOME/lib - used for utility jars</li>
<li>JMETER_HOME/lib/ext - used for JMeter components and plugins</li>
</ul>
<p>If you have developed new JMeter components,
then you should jar them and copy the jar into JMeter's <b>lib/ext</b> directory.
JMeter will automatically find JMeter components in any jars found here.
Do not use lib/ext for utility jars or dependency jars used by the plugins;
it is only intended for JMeter components and plugins.
</p>
<p>If you don't want to put JMeter plugin jars in the <b>lib/ext</b> directory,
then define the property <b>search_paths</b> in jmeter.properties.
</p>
<p>Utility and dependency jars (libraries etc) can be placed in the <b>lib</b> directory.</p>
<p>If you don't want to put such jars in the <b>lib</b> directory,
then define the property <b>user.classpath</b> or <b>plugin_dependency_paths</b>
in jmeter.properties. See below for an explanation of the differences.
</p>
<p>
Other jars (such as JDBC, JMS implementations and any other support libaries needed by the JMeter code)
should be placed in the <b>lib</b> directory - not the <b>lib/ext</b> directory,
or added to <b>user.classpath</b>.</p>
<p>Note: JMeter will only find .jar files, not .zip.</p>
<p>You can also install utility Jar files in $JAVA_HOME/jre/lib/ext, or you can set the property <b>user.classpath</b> in jmeter.properties</p>
<p>Note that setting the CLASSPATH environment variable will have no effect.
This is because JMeter is started with "java -jar", 
and the java command silently ignores the CLASSPATH variable, and the -classpath/-cp options when -jar is used. 
[This occurs with all Java programs, not just JMeter.]</p>
</div>

<div class="subsection"><h2>2.4.2 Create Test Plan from Template<a class="sectionlink" href="#template" title="Link to here">&para;</a></h2>
<p>You have the ability to create a new Test Plan from existing template.</p>
<p>To do so you use the menu <b>File</b> &gt; <b>Templates...</b> or Templates icon:
<figure><a href="../images/screenshots/template_menu.png"><img src="../images/screenshots/template_menu.png" width="" height="" alt="Templates icon item"></a><figcaption>Templates icon item</figcaption></figure>
</p>
<p>A popup appears, you can then choose a template among the list:
<figure><a href="../images/screenshots/template_wizard.png"><img src="../images/screenshots/template_wizard.png" width="" height="" alt="Templates popup"></a><figcaption>Templates popup</figcaption></figure>
</p>
<p>A documentation for each template explains what to do once test plan is created from template.</p>
</div>

<div class="subsection"><h2>2.4.3 Using JMeter behing a proxy<a class="sectionlink" href="#proxy_server" title="Link to here">&para;</a></h2>
<p>If you are testing from behind a firewall/proxy server, you may need to provide JMeter with
the firewall/proxy server hostname and port number.  To do so, run the jmeter[.bat] file
from a command line with the following parameters:</p>
<p>
-H [proxy server hostname or ip address]<br>
-P [proxy server port]<br>
-N [nonproxy hosts] (e.g. *.apache.org|localhost)<br>
-u [username for proxy authentication - if required]<br>
-a [password for proxy authentication - if required]<br>
</p>
<p><b>Example</b>: jmeter -H my.proxy.server -P 8000 -u username -a password -N localhost</p>
<p>You can also use --proxyHost, --proxyPort, --username, and --password as parameter names</p>
<div class="clear"></div><div class="note">
Parameters provided on a command-line may be visible to other users on the system.
</div><div class="clear"></div>
<p>
If the proxy host and port are provided, then JMeter sets the following System properties:
<ul>
<li>http.proxyHost</li>
<li>http.proxyPort</li>
<li>https.proxyHost</li>
<li>https.proxyPort</li>
</ul>
If a nonproxy host list is provided, then JMeter sets the following System properties:
<ul>
<li>http.nonProxyHosts</li>
<li>https.nonProxyHosts</li>
</ul>
So if you don't wish to set both http and https proxies, 
you can define the relevant properties in system.properties instead of using the command-line parameters.
</p>
<p>
Proxy Settings can also be defined in a Test Plan, using either the <a href="../usermanual/component_reference.html#HTTP_Request_Defaults">HTTP Request Defaults</a>
configuration or the <a href="../usermanual/component_reference.html#HTTP_Request">HTTP Request</a> sampler elements.
</p>
<div class="clear"></div><div class="note">JMeter also has its own in-built Proxy Server, the <a href="../usermanual/component_reference.html#HTTP(S)_Test_Script_Recorder">HTTP(S) Test Script Recorder</a>.
This is only used for recording HTTP or HTTPS browser sessions.
This is not to be confused with the proxy settings described above, which are used when JMeter makes HTTP or HTTPS requests itself.</div><div class="clear"></div>
</div>

<div class="subsection"><h2>2.4.4 Non-GUI Mode (Command Line mode)<a class="sectionlink" href="#non_gui" title="Link to here">&para;</a></h2>
<p>For non-interactive testing, you may choose to run JMeter without the GUI. To do so, use
the following command options:</p>
<p>
-n This specifies JMeter is to run in non-gui mode<br>
-t [name of JMX file that contains the Test Plan].<br>
-l [name of JTL file to log sample results to].<br>
-j [name of JMeter run log file].<br>
-r Run the test in the servers specified by the JMeter property "remote_hosts"<br>
-R [list of remote servers] Run the test in the specified remote servers
</p>
<p>The script also lets you specify the optional firewall/proxy server information:</p>
<p>
-H [proxy server hostname or ip address]<br>
-P [proxy server port]
</p>
<p><b>Example</b>: jmeter -n -t my_test.jmx -l log.jtl -H my.proxy.server -P 8000</p>
<p>
If the property <span class="code">jmeterengine.stopfail.system.exit</span> is set to true (default is false), 
then JMeter will invoke System.exit(1) if it cannot stop all threads.
Normally this is not necessary.
</p>
</div>

<div class="subsection"><h2>2.4.5 Server Mode<a class="sectionlink" href="#server" title="Link to here">&para;</a></h2>
<p>For <a href="remote-test.html">distributed testing</a>, run JMeter in server mode on the remote node(s), and then control the server(s) from the GUI.
You can also use non-GUI mode to run remote tests.
To start the server(s), run jmeter-server[.bat] on each server host.</p>
<p>The script also lets you specify the optional firewall/proxy server information:</p>
<p>-H [proxy server hostname or ip address]<br>
-P [proxy server port]</p>
<p><b>Example</b>: jmeter-server -H my.proxy.server -P 8000</p>
<p>If you want the server to exit after a single test has been run, then define the JMeter property server.exitaftertest=true.
</p>
<p>To run the test from the client in non-GUI mode, use the following command:</p>
<pre>
jmeter -n -t testplan.jmx -r [-Gprop=val] [-Gglobal.properties] [-X]
where:
-G is used to define JMeter properties to be set in the servers
-X means exit the servers at the end of the test
-Rserver1,server2 - can be used instead of -r to provide a list of servers to start
  Overrides remote_hosts, but does not define the property.
</pre>
<p>
If the property <span class="code">jmeterengine.remote.system.exit</span> is set to true (default is false), 
then JMeter will invoke System.exit(0) after stopping RMI at the end of a test.
Normally this is not necessary.
</p>
</div>

<div class="subsection"><h2>2.4.6 Overriding Properties Via The Command Line<a class="sectionlink" href="#override" title="Link to here">&para;</a></h2>
<p>Java system properties, JMeter properties, and logging properties can be overriden directly on the command line (instead of modifying jmeter.properties).
To do so, use the following options:</p>
<p>
-D[prop_name]=[value] - defines a java system property value.<br>
-J[prop name]=[value] - defines a local JMeter property.<br>
-G[prop name]=[value] - defines a JMeter property to be sent to all remote servers.<br>
-G[propertyfile] - defines a file containing JMeter properties to be sent to all remote servers.<br>
-L[category]=[priority] - overrides a logging setting, setting a particular category to the given priority level.
</p>
<p>The -L flag can also be used without the category name to set the root logging level.</p>
    <p><b>Examples</b>:
<pre>
jmeter -Duser.dir=/home/mstover/jmeter_stuff \
    -Jremote_hosts=127.0.0.1 -Ljmeter.engine=DEBUG

jmeter -LDEBUG</pre>
</p>
<p>
<b>N.B.<br>
    The command line properties are processed early in startup, but after the logging system has been set up.
    Attempts to use the -J flag to update log_level or log_file properties will have no effect.</b>
    </p>
</div>
<div class="subsection"><h2>2.4.7 Logging and error messages<a class="sectionlink" href="#logging" title="Link to here">&para;</a></h2>
    <div class="clear"></div><div class="note">
    JMeter does not generally use pop-up dialog boxes for errors, as these would interfere with
    running tests. Nor does it report any error for a mis-spelt variable or function; instead the
    reference is just used as is. See <a href="functions.html">Functions and Variables for more information</a>.
    </div><div class="clear"></div>
    <p>If JMeter detects an error during a test, a message will be written to the log file. 
        The log file name is defined in the jmeter.properties file (or using the -j option, see below).
        It defaults to <b>jmeter.log</b>, and will be found in the directory from which JMeter was launched.
        </p>
        <p>
        The menu <b>Options &gt; Log Viewer</b> displays the log file in a bottom pane on main JMeter window. 
        </p>
        <p>
        In the GUI mode, the number of error/fatal messages logged in the log file is displayed at top-right. 
        </p>
        <figure><a href="../images/screenshots/log_errors_counter.png"><img src="../images/screenshots/log_errors_counter.png" width="" height="" alt="Error/fatal counter"></a><figcaption>Error/fatal counter</figcaption></figure>
        <p>
        The command-line option <i>-j jmeterlogfile</i> allow to process
        after the initial properties file is read,
        and before any further properties are processed. 
        It therefore allows the default of jmeter.log to be overridden.
        The jmeter scripts that take a test plan name as a parameter (e.g. jmeter-n.cmd) have been updated
        to define the log file using the test plan name,
        e.g. for the test plan Test27.jmx the log file is set to Test27.log.
        </p>
        <p>When running on Windows, the file may appear as just <b>jmeter</b> unless you have set Windows to show file extensions.
        [Which you should do anyway, to make it easier to detect viruses and other nasties that pretend to be text files...]
        </p>
        <p>As well as recording errors, the jmeter.log file records some information about the test run. For example:</p>
<div overflow="scroll">
<pre>
10/17/2003 12:19:20 PM INFO  - jmeter.JMeter: Version 1.9.20031002 
10/17/2003 12:19:45 PM INFO  - jmeter.gui.action.Load: Loading file: c:\mytestfiles\BSH.jmx 
10/17/2003 12:19:52 PM INFO  - jmeter.engine.StandardJMeterEngine: Running the test! 
10/17/2003 12:19:52 PM INFO  - jmeter.engine.StandardJMeterEngine: Starting 1 threads for group BSH. Ramp up = 1. 
10/17/2003 12:19:52 PM INFO  - jmeter.engine.StandardJMeterEngine: Continue on error 
10/17/2003 12:19:52 PM INFO  - jmeter.threads.JMeterThread: Thread BSH1-1 started 
10/17/2003 12:19:52 PM INFO  - jmeter.threads.JMeterThread: Thread BSH1-1 is done 
10/17/2003 12:19:52 PM INFO  - jmeter.engine.StandardJMeterEngine: Test has ended
</pre>
</div>
<p>The log file can be helpful in determining the cause of an error,
    as JMeter does not interrupt a test to display an error dialogue.</p>
</div>
<div class="subsection"><h2>2.4.8 Full list of command-line options<a class="sectionlink" href="#options" title="Link to here">&para;</a></h2>
<p>Invoking JMeter as "jmeter -?" will print a list of all the command-line options. 
These are shown below.</p>
<pre>
        -h, --help
                print usage information and exit
        -v, --version
                print the version information and exit
        -p, --propfile {argument}
                the jmeter property file to use
        -q, --addprop {argument}
                additional property file(s)
        -t, --testfile {argument}
                the jmeter test(.jmx) file to run
        -j, --jmeterlogfile {argument}
                the jmeter log file
        -l, --logfile {argument}
                the file to log samples to
        -n, --nongui
                run JMeter in nongui mode
        -s, --server
                run the JMeter server
        -H, --proxyHost {argument}
                Set a proxy server for JMeter to use
        -P, --proxyPort {argument}
                Set proxy server port for JMeter to use
        -u, --username {argument}
                Set username for proxy server that JMeter is to use
        -a, --password {argument}
                Set password for proxy server that JMeter is to use
        -J, --jmeterproperty {argument}={value}
                Define additional JMeter properties
        -G, --globalproperty (argument)[=(value)]
                Define Global properties (sent to servers)
                e.g. -Gport=123
                 or -Gglobal.properties
        -D, --systemproperty {argument}={value}
                Define additional System properties
        -S, --systemPropertyFile {filename}
                a property file to be added as System properties
        -L, --loglevel {argument}={value}
                Define loglevel: [category=]level 
                e.g. jorphan=INFO or jmeter.util=DEBUG
        -r, --runremote (non-GUI only)
                Start remote servers (as defined by the jmeter property remote_hosts)
        -R, --remotestart  server1,... (non-GUI only)
                Start these remote servers (overrides remote_hosts)
        -d, --homedir {argument}
                the jmeter home directory to use
        -X, --remoteexit
                Exit the remote servers at end of test (non-GUI)
</pre>
<p>
Note: the JMeter log file name is formatted as a SimpleDateFormat (applied to the current date) 
if it contains paired single-quotes,  .e.g. 'jmeter_'yyyyMMddHHmmss'.log'
</p>
<p>
If the special name LAST is used for the -t, -j or -l flags, then JMeter takes that to mean the last test plan
that was run in interactive mode.
</p>
</div>

<div class="subsection"><h2>2.4.9 non-GUI shutdown<a class="sectionlink" href="#shutdown" title="Link to here">&para;</a></h2>
<p>
Prior to version 2.5.1, JMeter invoked System.exit() when a non-GUI test completed.
This caused problems for applications that invoke JMeter directly, so JMeter no longer invokes System.exit() 
for a normal test completion. [Some fatal errors may still invoke System.exit()]
JMeter will exit all the non-daemon threads it starts, but it is possible that some non-daemon threads
may still remain; these will prevent the JVM from exitting.
To detect this situation, JMeter starts a new daemon thread just before it exits.
This daemon thread waits a short while; if it returns from the wait, then clearly the
JVM has not been able to exit, and the thread prints a message to say why.
</p>
<p>
The property <span class="code">jmeter.exit.check.pause</span> can be used to override the default pause of 2000ms (2secs).
If set to 0, then JMeter does not start the daemon thread.
</p>
</div>

</div><div class="section"><h1 id="configuring_jmeter">2.5 Configuring JMeter<a class="sectionlink" href="#configuring_jmeter" title="Link to here">&para;</a></h1>
<p>If you wish to modify the properties with which JMeter runs you need to
  either modify the user.properties in the /bin directory or create
  your own copy of the jmeter.properties and specify it in the command line.
  </p>
  <div class="clear"></div><div class="note">
  Note: You can define additional JMeter properties in the file defined by the
  JMeter property <b>user.properties</b> which has the default value <b>user.properties</b>.
  The file will be automatically loaded if it is found in the current directory
  or if it is found in the JMeter bin directory.
  Similarly, <b>system.properties</b> is used to update system properties.
  </div><div class="clear"></div>
  <div class="properties"><h3>
        Parameters
        </h3><div class="property title"><div class="name title">Attribute</div><div class="description title">Description</div><div class="required title">Required</div></div>
    <div class="property"><div class="name req-true">ssl.provider</div><div class="description req-true">You can specify the class for your SSL
    implementation if you don't want to use the built-in Java implementation.
    </div><div class="required req-true">
            No
          </div></div>
    <div class="property"><div class="name req-true">xml.parser</div><div class="description req-true">You can specify an implementation as your XML
    parser.  The default value is: org.apache.xerces.parsers.SAXParser</div><div class="required req-true">
            No
          </div></div>
  <div class="property"><div class="name req-true">remote_hosts</div><div class="description req-true">Comma-delimited list of remote JMeter hosts (or host:port if required).
    If you are running JMeter in a distributed environment, list the machines where
  you have JMeter remote servers running.  This will allow you to control those
    servers from this machine's GUI</div><div class="required req-true">
            No
          </div></div>
  <div class="property"><div class="name req-true">not_in_menu</div><div class="description req-true">A list of components you do not want to see in
    JMeter's menus.  As JMeter has more and more components added, you may wish to
  customize your JMeter to show only those components you are interested in.
  You may list their classname or their class label (the string that appears
  in JMeter's UI) here, and they will no longer appear in the menus.</div><div class="required req-true">
            No
          </div></div>
  <div class="property"><div class="name req-true">search_paths</div><div class="description req-true">
  List of paths (separated by ;) that JMeter will search for JMeter plugin classes,
  for example additional samplers. A path item can either be a jar file or a directory.
  Any jar file in such a directory will be automatically included in search_paths,
  jar files in sub directories are ignored.
  The given value is in addition to any jars found in the lib/ext directory.
  </div><div class="required req-true">
            No
          </div></div>
  <div class="property"><div class="name req-true">user.classpath</div><div class="description req-true">
  List of paths that JMeter will search for utility and plugin dependency classes.
  Use your platform path separator to separate multiple paths.
  A path item can either be a jar file or a directory.
  Any jar file in such a directory will be automatically included in user.classpath,
  jar files in sub directories are ignored.
  The given value is in addition to any jars found in the lib directory.
  All entries will be added to the class path of the system class loader
  and also to the path of the JMeter internal loader.
  </div><div class="required req-true">
            No
          </div></div>
  <div class="property"><div class="name req-true">plugin_dependency_paths</div><div class="description req-true">
  List of paths (separated by ;) that JMeter will search for utility
  and plugin dependency classes.
  A path item can either be a jar file or a directory.
  Any jar file in such a directory will be automatically included in plugin_dependency_paths,
  jar files in sub directories are ignored.
  The given value is in addition to any jars found in the lib directory
  or given by the user.classpath property.
  All entries will be added to the path of the JMeter internal loader only.
  For plugin dependencies using plugin_dependency_paths should be preferred over
  user.classpath.
  </div><div class="required req-true">
            No
          </div></div>
  <div class="property"><div class="name req-true">user.properties</div><div class="description req-true">
  Name of file containing additional JMeter properties. 
  These are added after the initial property file, but before the -q and -J options are processed.
  </div><div class="required req-true">
            No
          </div></div>
  <div class="property"><div class="name req-true">system.properties</div><div class="description req-true">
  Name of file containing additional system properties.
  These are added before the -S and -D options are processed.
  </div><div class="required req-true">
            No
          </div></div>
  </div>
  <p>
  The command line options and properties files are processed in the following order:
  <ul>
  <li>-p propfile</li>
  <li>jmeter.properties (or the file from the -p option) is then loaded</li>
  <li>-j logfile</li>
  <li>Logging is initialised</li>
  <li>user.properties is loaded</li>
  <li>system.properties is loaded</li>
  <li>all other command-line options are processed</li>
  </ul>
  </p>
<p><b>
See also the comments in the jmeter.properties, user.properties and system.properties files for further information on other settings you can change.
</b></p>
</div><ul class="pagelinks"><li><a href="intro.html">&lt; Prev</a></li><li><a href="../index.html">Index</a></li><li><a href="build-test-plan.html">Next &gt;</a></li></ul></div><div class="footer"><div class="copyright">
            Copyright &copy;
            1999 &ndash;
            2015
            , Apache Software Foundation
          </div><div class="trademarks">Apache, Apache JMeter, JMeter, the Apache
            feather, and the Apache JMeter logo are
            trademarks of the
            Apache Software Foundation.
          </div></div></body></html>